def print_line():
    print("-" * 20)

def print_lines(num=1):
    for i in range(num):
        print_line()


print_lines(2)

'''
使用while循环的写法

def print_lines(num):
    i = 0
    while i < num:
        print_line()
        i += 1
'''